#coding=utf-8
import traceback
import sys

class RealTrasactionApiError(Exception):
    @staticmethod
    def get_error_info():
        exc_type, exc_value, exc_traceback = sys.exc_info()
        return traceback.extract_tb(exc_traceback)[-1]

class dbQueryError(RealTrasactionApiError):
    def __init__(self,detail=''):
        self.msg='ERROR SQL'
        self.detail=detail


class emptyQueryError(dbQueryError):
    def __init__(self,detail=''):
        self.msg = 'EMPTY SQL'
        self.detail = detail

class inputParaError(RealTrasactionApiError):
    def __init__(self,detail=''):
        self.msg = 'ERROR INPUT'
        self.detail = detail

class proxyApiError(RealTrasactionApiError):
    def __init__(self,detail=''):
        self.msg = 'ERROR PROXY'
        self.detail = detail

class OutPutError(RealTrasactionApiError):
    def __init__(self,detail=''):
        self.detail = detail
        self.msg = 'OUTPUT ERROR'

